<template>
	<cl-page statusBarBackground="#fff" background-color="#F1F1F1" :fullscreen="true">
		<cl-sticky>
			<cl-topbar
				:border="false"
				background-color="#fff"
				color="#333"
				:title="t('bill.stages.title')"
			/>
		</cl-sticky>
		<view class="page-info animate__animated animate__fadeIn">
			<view class="content">
				<view class="money">
					<view class="title">{{ $t("bill.stages.money") }}</view>
					<view class="flex align-end num">
						<view class="font">￥</view>
						<cl-input
							class="input"
							clearable
							:border="false"
							disabled=""
							v-model="money"
						/>
					</view>
					<view class="flex flex-between align-center text">
						<view class="to">{{ $t("bill.stages.bill") }}</view>
					</view>
				</view>
				<view class="detail mt30">
					<view class="li">
						<view class="flex align-center">
							<cl-icon name="success-fill" size="40rpx" color="#0C81F7"></cl-icon>
							<view class="title flex align-center flex1" style="border: none">
								分3期 <view class="font">X</view> {{ $t("bill.stages.every") }}0.00
							</view>
						</view>
						<view class="infolist">
							<view>第1期 3月10还1666.67元(含手续费0.00元)</view>
							<view>第2期 4月10还1666.67元(含手续费0.00元)</view>
							<view>第3期 5月10还1666.67元(含手续费0.00元)</view>
						</view>
					</view>
					<view class="li flex align-center" v-for="i in 3">
						<cl-icon name="success-fill" size="40rpx" color="#0C81F7"></cl-icon>
						<view class="title flex align-center flex1">
							分{{ (i + 1) * 3 }}期 <view class="font">X</view> 每期0.00
						</view>
					</view>
				</view>
				<view class="btn mt30" @click="show = true">{{ $t("bill.stages.alert") }}</view>
				<cl-popup class="popup" v-model="show" direction="bottom">
					<view class="title"
						>{{ $t("bill.stages.alert") }}
						<image
							class="close"
							src="/static/images/close.png"
							mode="aspectFill"
							@click="show = false"
						>
						</image>
					</view>
					<view class="list">
						<view class="li flex flex-between align-center">
							<view class="t1">{{ $t("bill.stages.money") }}</view>
							<view class="t2">9800.00</view>
						</view>
						<view class="li flex flex-between align-center">
							<view class="t1">{{ $t("bill.stages.num") }}</view>
							<view class="t2">3期</view>
						</view>
						<view class="li flex flex-between align-center">
							<view class="t1">{{ $t("bill.stages.everymoney") }}</view>
							<view>
								<view class="t2">1666.67 </view>
								<view class="t3">({{ $t("bill.stages.sxf") }}0.00)</view>
							</view>
						</view>
						<view class="li flex flex-between align-center">
							<view class="t1">{{ $t("bill.stages.first") }}</view>
							<view class="t2">3月10日</view>
						</view>
						<view class="li flex flex-between align-center">
							<view class="t4">{{ $t("bill.stages.detail") }}</view>
							<view class="t4">0X3</view>
						</view>
					</view>
					<view
						class="btn"
						@click="
							show = false;
							router.push('/pages/user/bill/stagesResult');
						"
						>{{ $t("bill.stages.ok") }}</view
					>
				</cl-popup>
			</view>
		</view>
	</cl-page>
</template>

<script lang="ts" setup>
import { onReady } from "@dcloudio/uni-app";
import { useApp, useCool, useStore } from "/@/cool";
import { useUi } from "/$/cool-ui";
import { useI18n } from "vue-i18n";
import { ref } from "vue";
const { locale } = useI18n();
const { t } = useI18n();
const { router, upload } = useCool();
const { user } = useStore();
const ui = useUi();
const app = useApp();
const money = ref(9800);
const show = ref(false);
const more = () => {
	router.push("/pages/user/callingCard/edit");
};
</script>

<style lang="scss" scoped>
.page-info {
	.content {
		padding: 30rpx;
		box-sizing: border-box;
	}

	.money {
		.box {
			overflow: hidden;
			transition: all 0.3s ease;
		}

		width: 100%;
		background: #ffffff;
		box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(170, 170, 170, 0.1);
		border-radius: 20rpx;
		box-sizing: border-box;
		padding: 30rpx 40rpx;

		.btn_ {
			font-family: PingFangSC;
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
			line-height: 50rpx;
			// margin-top: 50rpx;
		}

		.title {
			font-family: PingFangSC;
			font-weight: 400;
			font-size: 38rpx;
			color: #333333;
			margin-bottom: 30rpx;
		}

		.num {
			margin-top: 50rpx;

			.font {
				font-family: PingFangSC;
				font-weight: 400;
				font-size: 40rpx;
				color: #0c81f7;
			}

			:deep(.uni-input-input) {
				font-family: HelveticaNeue;
				font-weight: 500;
				font-size: 70rpx;
				color: #0c81f7;
			}

			:deep(.uni-input-placeholder) {
				font-size: 50rpx;
			}

			:deep(.is-disabled) {
				background-color: transparent;
			}
		}

		.text {
			margin-top: 30rpx;

			.to {
				font-family: PingFangSC;
				font-weight: 400;
				font-size: 24rpx;
				color: #666666;
			}

			.tt {
				font-family: PingFangSC;
				font-weight: 400;
				font-size: 24rpx;
				color: #0c81f7;
			}
		}
	}

	.detail {
		width: 100%;
		background: #ffffff;
		box-shadow: 0rpx 10rpx 20rpx 0rpx rgba(170, 170, 170, 0.1);
		border-radius: 20rpx;
		padding: 30rpx;
		box-sizing: border-box;

		.infolist {
			font-family: PingFangSC;
			font-weight: 400;
			font-size: 24rpx;
			color: #999999;
			line-height: 44rpx;
			margin-left: 74rpx;
			border-bottom: 1rpx solid #eeeeee;
			padding-bottom: 40rpx;
		}

		.title {
			font-family: PingFangSC;
			font-weight: 400;
			font-size: 32rpx;
			color: #333333;
			margin-left: 30rpx;
			border-bottom: 1rpx solid #eeeeee;
			padding: 40rpx 0;

			.font {
				color: #999999;
				padding: 0 10rpx;
			}
		}

		.li:last-child {
			.title {
				border-bottom: none;
			}
		}
	}

	.btn {
		width: 100%;
		height: 88rpx;
		background: linear-gradient(0deg, #0c81f7 0%, #44a1ff 100%);
		border-radius: 20rpx;
		font-family: PingFangSC;
		font-weight: 400;
		font-size: 38rpx;
		color: #ffffff;
		line-height: 88rpx;
		text-align: center;
	}

	:deep(.cl-popup__container) {
		padding: 0 !important;
	}

	:deep(.cl-popup) {
		border-top-left-radius: 20rpx;
		border-top-right-radius: 20rpx;
		overflow: hidden;
		padding-bottom: 100rpx;
	}

	.popup {
		.title {
			font-family: PingFangSC;
			font-weight: 400;
			font-size: 32rpx;
			color: #000000;
			line-height: 100rpx;
			text-align: center;
			position: relative;
			border-bottom: 1rpx solid #e5e5e5;

			.close {
				width: 44rpx;
				height: 44rpx;
				position: absolute;
				top: 28rpx;
				right: 30rpx;
			}
		}

		.list {
			padding: 30rpx 30rpx 20rpx;

			.li {
				margin-bottom: 40rpx;
			}

			.t1 {
				font-family: PingFangSC;
				font-weight: 400;
				font-size: 28rpx;
				color: #999999;
			}

			.t2 {
				font-family: PingFangSC;
				font-weight: 400;
				font-size: 28rpx;
				color: #666666;
				text-align: right;
			}

			.t3 {
				font-family: PingFangSC;
				font-weight: 400;
				font-size: 28rpx;
				color: #999;
			}

			.t4 {
				font-family: PingFangSC;
				font-weight: 400;
				font-size: 32rpx;
				color: #333333;
			}
		}

		.btn {
			width: calc(100% - 60rpx);
			margin-left: 30rpx;
		}
	}
}
</style>
